﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Backend.JYD.Model
{
    public class TreeNodeInfo
    {
        public TreeNodeInfo()
        {
        }

        public TreeNodeInfo(int id, string name, int? parentId) : this(id, name, parentId, string.Empty, false, false) { }

        public TreeNodeInfo(int id, string name, int? parentId, string url, bool expanded, bool isLeaf)
        {
            this.Id = id;
            this.Name = name;
            this.IsLeaf = isLeaf;
            this.NodeUrl = url;
            this.ParentId = parentId;
            this.Expanded = expanded;
        }
        /// <summary>
        /// 节点ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 节点名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 节点Url
        /// </summary>
        public string NodeUrl { get; set; }

        /// <summary>
        /// 节点Href
        /// </summary>
        public bool IsLeaf { get; set; }

        /// <summary>
        /// 节点是否展开
        /// </summary>
        public bool Expanded { get; set; }

        /// <summary>
        /// 节点父节点
        /// </summary>
        public int? ParentId { get; set; }

    }
}
